package com.yybray.service;

import com.yybray.bean.User;

import java.util.Optional;

/**
 * Created by yeyu on 2016/9/12.
 */
public class UserService implements InterfaceTest {
    public User getUser() {
        Optional<User> optional = Optional.ofNullable(new User(1, "阿斯顿"));
        return optional.orElse(null);
    }
    public User getNullUser() {
        Optional<User> optional = Optional.ofNullable(null);
        return optional.orElse(null);
    }
}
